type context_t =
{
mutable domain : int;
- mutable execution_domain : int
+ mutable vcpu : int
}
-let default_context = { domain = 0; execution_domain = 0 }
+let default_context = { domain = 0; vcpu = 0 }
-let new_context dom exec_dom = {domain = dom; execution_domain = exec_dom}
+let new_context new_dom new_vcpu = {domain = new_dom; vcpu = new_vcpu}
let set_domain ctx value =
ctx.domain <- value
-let set_execution_domain ctx value =
- ctx.execution_domain <- value
+let set_vcpu ctx value =
+ ctx.vcpu <- value
let get_domain ctx =
ctx.domain
-let get_execution_domain ctx =
- ctx.execution_domain
+let get_vcpu ctx =
+ ctx.vcpu
let string_of_context ctx =
- Printf.sprintf "{domain} domain: %d, execution_domain: %d"
- ctx.domain ctx.execution_domain
+ Printf.sprintf "{domain} domain: %d, vcpu: %d"
+ ctx.domain ctx.vcpu
external read_registers : context_t -> registers = "dom_read_registers"
external write_register : context_t -> register -> int32 -> unit =
val set_domain : context_t -> int -> unit
val get_domain : context_t -> int
-val set_execution_domain : context_t -> int -> unit
-val get_execution_domain : context_t -> int
+val set_vcpu : context_t -> int -> unit
+val get_vcpu : context_t -> int
val string_of_context : context_t -> string
match ctx with
| Domain d ->
if (((Domain.get_domain d) = dom) &&
- ((Domain.get_execution_domain d) = vcpu))
+ ((Domain.get_vcpu d) = vcpu))
then
key :: list
else
let attach_debugger ctx =
match ctx with
| Domain d -> Domain.attach_debugger (Domain.get_domain d)
- (Domain.get_execution_domain d)
+ (Domain.get_vcpu d)
| Process p ->
begin
let xdom_sock = find_xen_domain_context (Process.get_domain p) in
let detach_debugger ctx =
match ctx with
| Domain d -> Domain.detach_debugger (Domain.get_domain d)
- (Domain.get_execution_domain d)
+ (Domain.get_vcpu d)
| Process p -> Process.detach_debugger p
| _ -> raise (Unimplemented "detach debugger")